public class project {
    public static void main(String[] args) {
        
    }
    public static void main2(String[] args) {
        System.out.println("aa");
    }
    public boolean canConstruct(String ransomNote, String magazine) {
        int[] arr=new int[26];
        for(char ch : magazine.toCharArray() ){
            arr[ch-'a']++;
        }
        for(char ch : ransomNote.toCharArray()){
            arr[ch-'a']--;
        }
        for(int num : arr){
            if(num<0){
                return false;
            }
        }
        return true;
    }
}
